package com.shangxian.giveithome.mapper;

import com.shangxian.giveithome.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface AdoptionMapper {

    List<Adoption> queryByUsAdopTion(@Param("id") Long id, @Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize);

    Integer countByUsAdoption(Long id);

    Integer queryByPlaceSu(Long id);

    void save(Adoption adoption);

    void saveAgreement(AdoptionCreate adoptionCreate);

    void saveAgreement_2(AdoptionComplete adoptionComplete);

    void updateAdIdByPetId(@Param("adId")Long adId, @Param("petId") Long petId, @Param("createTime") Date createTime);

    Adoption queryAdoptionById(Long petId);

    List<AdoptionAgreement> queryAgreementById(Long petId);

    void deleteUsAll(@Param("petId") Long petId, @Param("usId") Long usId);

    String queryImgByPetId(Long petId);

    void updateImgByPetId(@Param("imgId") Long imgId, @Param("petId") Long petId);

    UserSimple findAUserSimpleByPetId(Long id);

    UserSimple findSUserSimpleByPetId(Long id);
}
